function expandirAdicionales()
{
    var current = document.getElementById("adicionales").style.display != "none";
	document.getElementById("adicionales").style.display = current ? "none" : "";
	document.getElementById("expandirIcono").src = "imagenes" + (current ? "/expandir.gif" : "/contraer.gif");
}
function checkarAdicionales(cod, casilla)
{
	if(casilla.checked)
	{
		document.getElementById('caja-'+cod).disabled = false;
		document.getElementById('caja-'+cod).style.display = "";
	}
	else
	{
		document.getElementById('caja-'+cod).disabled = true;
		document.getElementById('caja-'+cod).value = "";
		document.getElementById('caja-'+cod).style.display = "none";
	}
}
function checkarFotoAdicional(cod, casilla)
{
	if(casilla.checked)
	{
		document.getElementById('foto-'+cod).disabled = false;
		document.getElementById('foto-'+cod).style.display = "";
	}
	else
	{
		document.getElementById('foto-'+cod).disabled = true;
		document.getElementById('foto-'+cod).value = "";
		document.getElementById('foto-'+cod).style.display = "none";
	}
}
function actualizaFoto()
{
	var x = document.getElementById('modificarImagen').checked;
	document.getElementById('imagen').disabled = !x;
	document.getElementById('imagen').value = "";
}